using BookingSystem.Entities;
using FluentNHibernate.Mapping;

namespace BookingSystem.Mappings
{
    public class GuestMap : ClassMap<Guest>
    {
        public GuestMap()
        {
            Id(x => x.Id);
            Map(x => x.FirstName);
            Map(x => x.LastName);
            Map(x => x.Address);
            Map(x => x.Postalcode);
            Map(x => x.City);
            Map(x => x.Phonenumber);
            Map(x => x.Email);
            Map(x => x.Member);
            Map(x => x.Birthday);
            HasMany(x => x.Bookings).Cascade.All();
        }
    }
}